$(function () {
  $('#prixchart1').highcharts({
      chart: {
          type: 'spline'
      },
      title: {
         text: '热卷指数',
         align: 'left',
         verticalAlign: 'top',
         style: {
          fontWeight: 'normal',
          fontSize: '14px',
          fontFamily: 'microsoft yahei'
         }
       },
      credits: {
            enabled: false
        },
      // subtitle: {
      //     text: 'October 6th and 7th 2009 at two locations in Vik i Sogn, Norway'
      // },
      xAxis: {
          type: 'datetime',
          dateTimeLabelFormats : { 
            day : '%b-%d',
            //second: '%H:%M:%S',
               // minute: '%e. %b %H:%M',
              //  hour: '%b/%e %H:%M',
              //  day: '%e日/%b',
               // week: '%e. %b',
               // month: '%b %y',
               // year: '%Y'
        },
        tickInterval: 24 * 24 * 3600 * 1000//间隔2天
      },
      yAxis: {
          title: {
              text: null
          },
          min: 0,
          minorGridLineWidth: 0,
          gridLineWidth: 1,
          alternateGridColor: null
      },
      plotOptions: {
          spline: {
              lineWidth: 2,
              states: {
                  hover: {
                      lineWidth: 2
                  }
              },
              marker: {
                  enabled: false
              },
              pointInterval: 24*3600*1000,
              pointStart: Date.UTC(2016, 9, 6)
          }
      },
      tooltip: {
          dateTimeLabelFormats: {
              day: 20 + '%y/%m/%e'
          }
      },
      legend:{
        align: 'right',
        verticalAlign: 'top',
        y: -8,
        style: {
         fontWeight: 'normal'
        }
      },
      series: [{
          name: '螺纹',
          data: [4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0,4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0],
            color:'#FEB951'

      }, {
          name: '普卷',
          data: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4]
      }]
      ,
      navigation: {
          menuItemStyle: {
              fontSize: '10px'
          }
      }
  });

  $('#prixchart2').highcharts({
      chart: {
          type: 'spline'
      },
      title: {
         text: '热卷指数',
         align: 'left',
         verticalAlign: 'top',
         style: {
          fontWeight: 'normal',
          fontSize: '14px',
          fontFamily: 'microsoft yahei'
         }
       },
      credits: {
            enabled: false
        },
      // subtitle: {
      //     text: 'October 6th and 7th 2009 at two locations in Vik i Sogn, Norway'
      // },
      xAxis: {
          type: 'datetime',
          dateTimeLabelFormats : { 
            day : '%b-%d',
            //second: '%H:%M:%S',
               // minute: '%e. %b %H:%M',
              //  hour: '%b/%e %H:%M',
              //  day: '%e日/%b',
               // week: '%e. %b',
               // month: '%b %y',
               // year: '%Y'
        },
        tickInterval: 24 * 24 * 3600 * 1000//间隔2天
      },
      yAxis: {
          title: {
              text: null
          },
          min: 0,
          minorGridLineWidth: 0,
          gridLineWidth: 1,
          alternateGridColor: null
      },
      plotOptions: {
          spline: {
              lineWidth: 2,
              states: {
                  hover: {
                      lineWidth: 2
                  }
              },
              marker: {
                  enabled: false
              },
              pointInterval: 24*3600*1000,
              pointStart: Date.UTC(2016, 9, 6)
          }
      },
      tooltip: {
          dateTimeLabelFormats: {
              day: 20 + '%y/%m/%e'
          }
      },
      legend:{
        align: 'right',
        verticalAlign: 'top',
        y: -8,
        style: {
         fontWeight: 'normal'
        }
      },
      series: [{
          name: '螺纹',
          data: [4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0,4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0],
            color:'#FEB951'

      }, {
          name: '普卷',
          data: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4]
      }]
      ,
      navigation: {
          menuItemStyle: {
              fontSize: '10px'
          }
      }
  });

  $('#prixchart3').highcharts({
      chart: {
          type: 'spline'
      },
      title: {
         text: '热卷指数',
         align: 'left',
         verticalAlign: 'top',
         style: {
          fontWeight: 'normal',
          fontSize: '14px',
          fontFamily: 'microsoft yahei'
         }
       },
      credits: {
            enabled: false
        },
      // subtitle: {
      //     text: 'October 6th and 7th 2009 at two locations in Vik i Sogn, Norway'
      // },
      xAxis: {
          type: 'datetime',
          dateTimeLabelFormats : { 
            day : '%b-%d',
            //second: '%H:%M:%S',
               // minute: '%e. %b %H:%M',
              //  hour: '%b/%e %H:%M',
              //  day: '%e日/%b',
               // week: '%e. %b',
               // month: '%b %y',
               // year: '%Y'
        },
        tickInterval: 24 * 24 * 3600 * 1000//间隔2天
      },
      yAxis: {
          title: {
              text: null
          },
          min: 0,
          minorGridLineWidth: 0,
          gridLineWidth: 1,
          alternateGridColor: null
      },
      plotOptions: {
          spline: {
              lineWidth: 2,
              states: {
                  hover: {
                      lineWidth: 2
                  }
              },
              marker: {
                  enabled: false
              },
              pointInterval: 24*3600*1000,
              pointStart: Date.UTC(2016, 9, 6)
          }
      },
      tooltip: {
          dateTimeLabelFormats: {
              day: 20 + '%y/%m/%e'
          }
      },
      legend:{
        align: 'right',
        verticalAlign: 'top',
        y: -8,
        style: {
         fontWeight: 'normal'
        }
      },
      series: [{
          name: '螺纹',
          data: [4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0,4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0],
            color:'#FEB951'

      }, {
          name: '普卷',
          data: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4]
      }]
      ,
      navigation: {
          menuItemStyle: {
              fontSize: '10px'
          }
      }
  });

  $('#prixchart4').highcharts({
      chart: {
          type: 'spline'
      },
      title: {
         text: '热卷指数',
         align: 'left',
         verticalAlign: 'top',
         style: {
          fontWeight: 'normal',
          fontSize: '14px',
          fontFamily: 'microsoft yahei'
         }
       },
      credits: {
            enabled: false
        },
      // subtitle: {
      //     text: 'October 6th and 7th 2009 at two locations in Vik i Sogn, Norway'
      // },
      xAxis: {
          type: 'datetime',
          dateTimeLabelFormats : { 
            day : '%b-%d',
            //second: '%H:%M:%S',
               // minute: '%e. %b %H:%M',
              //  hour: '%b/%e %H:%M',
              //  day: '%e日/%b',
               // week: '%e. %b',
               // month: '%b %y',
               // year: '%Y'
        },
        tickInterval: 24 * 24 * 3600 * 1000//间隔2天
      },
      yAxis: {
          title: {
              text: null
          },
          min: 0,
          minorGridLineWidth: 0,
          gridLineWidth: 1,
          alternateGridColor: null
      },
      plotOptions: {
          spline: {
              lineWidth: 2,
              states: {
                  hover: {
                      lineWidth: 2
                  }
              },
              marker: {
                  enabled: false
              },
              pointInterval: 24*3600*1000,
              pointStart: Date.UTC(2016, 9, 6)
          }
      },
      tooltip: {
          dateTimeLabelFormats: {
              day: 20 + '%y/%m/%e'
          }
      },
      legend:{
        align: 'right',
        verticalAlign: 'top',
        y: -8,
        style: {
         fontWeight: 'normal'
        }
      },
      series: [{
          name: '螺纹',
          data: [4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0,4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
              7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
              8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
              7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
              3.0, 3.0],
            color:'#FEB951'

      }, {
          name: '普卷',
          data: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
              0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
              0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
              3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4]
      }]
      ,
      navigation: {
          menuItemStyle: {
              fontSize: '10px'
          }
      }
  });
});